<?php

/**
 * Client form base class.
 *
 * @package    vvberp
 * @subpackage form
 * @author     Flo
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseClientForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'            => new sfWidgetFormInputHidden(),
      'domeniu_id'    => new sfWidgetFormPropelChoice(array('model' => 'Domeniu', 'add_empty' => false)),
      'nume'          => new sfWidgetFormInput(),
      'cui'           => new sfWidgetFormInput(),
      'cont'          => new sfWidgetFormInput(),
      'banca'         => new sfWidgetFormInput(),
      'sucursala'     => new sfWidgetFormInput(),
      'email'         => new sfWidgetFormInput(),
      'telefon_fix'   => new sfWidgetFormInput(),
      'telefon_mobil' => new sfWidgetFormInput(),
      'fax'           => new sfWidgetFormInput(),
      'updated_at'    => new sfWidgetFormDateTime(),
      'created_at'    => new sfWidgetFormDateTime(),
      'created_by'    => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
      'updated_by'    => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'id'            => new sfValidatorPropelChoice(array('model' => 'Client', 'column' => 'id', 'required' => false)),
      'domeniu_id'    => new sfValidatorPropelChoice(array('model' => 'Domeniu', 'column' => 'id')),
      'nume'          => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'cui'           => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'cont'          => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'banca'         => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'sucursala'     => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'email'         => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'telefon_fix'   => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'telefon_mobil' => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'fax'           => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'updated_at'    => new sfValidatorDateTime(array('required' => false)),
      'created_at'    => new sfValidatorDateTime(array('required' => false)),
      'created_by'    => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
      'updated_by'    => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('client[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Client';
  }


}
